You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Report strict-mode errors for class names eval and arguments - #64682
bindClassLikeDeclaration did not call checkStrictModeEvalOrArguments, so class declarations and expressions named eval or arguments escaped TS1210. Call the check while binding class-like declarations and use the class-specific diagnostic for class names.
Add regression coverage for class declarations, named class expressions, ambient class declarations, and JavaScript with checkJs.
Validation:
Focused Go test passed: go -C ./tsc test '-run=TestLocal/(strictModeEvalOrArgumentsInClassName|strictModeReservedWordInClassDeclaration|argumentsReferenceInMethod4_Js)' ./internal/testrunner
npx hereby test, npx hereby lint, and npx hereby check:format were not run.
Add sloppy-script regression test without module marker
tsc/internal/binder/binder.go:950
The regression test only exercises external modules (export {} appears in every executable test file, and the test also enables strict mode), so it does not lock down the important behavior added here: a class name must be checked even in an otherwise sloppy script. Please add at least one .ts or .js script case without a module marker and with alwaysStrict disabled; otherwise an implementation that incorrectly depends on the enclosing strict mode would still satisfy these baselines.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #64661
bindClassLikeDeclarationdid not callcheckStrictModeEvalOrArguments, so class declarations and expressions namedevalorargumentsescaped TS1210. Call the check while binding class-like declarations and use the class-specific diagnostic for class names.Add regression coverage for class declarations, named class expressions, ambient class declarations, and JavaScript with
checkJs.Validation:
go -C ./tsc test '-run=TestLocal/(strictModeEvalOrArgumentsInClassName|strictModeReservedWordInClassDeclaration|argumentsReferenceInMethod4_Js)' ./internal/testrunnernpx hereby test,npx hereby lint, andnpx hereby check:formatwere not run.